<template>
  <div class="execution">
    <basic-container>
      <headquarter v-if="shopId === ''"></headquarter>
      <branch v-else ref="branch"></branch>
    </basic-container>
  </div>
</template>

<script>
  import Branch from '@/components/config/branch'
  import Headquarter from '@/components/config/headquarter'
  export default {
    name: 'config',
    components:{
      Branch,
      Headquarter
    },
    data(){
      return{
        shopId: ''
      }
    },
    created(){
      this.shopId = this.$store.state.user.shopId
      if(this.shopId){
        this.$nextTick(() => {
          this.$refs.branch.getList(this.shopId)
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
</style>
